package com.example.demo.util;

import org.apache.commons.lang3.RandomStringUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class FileNameUtil {
    private static Pattern p = Pattern.compile("^[a-zA-z0-9.]*$");
    public static boolean isAlphaNumber(String str){
        Matcher m = p.matcher(str);
        return m.matches();
    }

    public static String getRandomString(){
        return RandomStringUtils.randomAlphanumeric(16);
    }
}
